/*jadclipse*/// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.

package com.teamcenter.rac.common.actions;

import com.teamcenter.rac.aif.*;
import com.teamcenter.rac.aif.common.actions.AbstractAIFAction;
import com.teamcenter.rac.common.Activator;
import com.teamcenter.rac.services.ISelectionMediatorService;
import com.teamcenter.rac.util.MessageBox;
import com.teamcenter.rac.util.Registry;
import java.awt.Frame;
import org.eclipse.ui.*;

public class PasteAction extends AbstractAIFAction {

	/**
	 * @deprecated Method PasteAction is deprecated
	 */

	public PasteAction(AbstractAIFApplication abstractaifapplication,
			Frame frame, String s) {
		super(abstractaifapplication, frame, s);
		System.out.println("super(abstractaifapplication, frame, s);");
	}

	/**
	 * @deprecated Method PasteAction is deprecated
	 */

	public PasteAction(AbstractAIFUIApplication abstractaifuiapplication,
			String s) {
		super(abstractaifuiapplication, s);
		System.out.println("super(abstractaifuiapplication, s);");
	}

	/**
	 * @deprecated Method PasteAction is deprecated
	 */

	public PasteAction(AbstractAIFUIApplication abstractaifuiapplication,
			Registry registry, String s) {
		super(abstractaifuiapplication, registry, s);
		System.out.println("super(abstractaifuiapplication, registry, s);");
	}

	public PasteAction(Registry registry, String s) {
		super(registry, AIFDesktop.getActiveDesktop(), s);
		System.out.println("super(registry, AIFDesktop.getActiveDesktop(), s);");
	}

	public void run() {
		System.out.println("run==============");
		com.teamcenter.rac.aif.kernel.InterfaceAIFComponent ainterfaceaifcomponent[];
		ainterfaceaifcomponent = Activator.getDefault()
				.getSelectionMediatorService().getTargetComponents();
		if (ainterfaceaifcomponent == null) {
			MessageBox messagebox = new MessageBox(parent,
					registry.getString("noObjectsSelected"),
					registry.getString("pasteNoSelection.TITLE"), 4);
			messagebox.setModal(true);
			messagebox.setVisible(true);
			return;
		}
		try {
			String s = getCommandKey();
			AbstractAIFCommand abstractaifcommand = (AbstractAIFCommand) registry
					.newInstanceForEx(s, new Object[] { ainterfaceaifcomponent,
							parent, Boolean.FALSE });
			abstractaifcommand.executeModal();
		} catch (Exception exception) {
			org.eclipse.swt.widgets.Shell shell = PlatformUI.getWorkbench()
					.getWorkbenchWindows()[0].getShell();
			MessageBox.post(shell, exception, true);
		}
		return;
	}
}


/*
	DECOMPILATION REPORT

	Decompiled from: C:\Siemens\Teamcenter8\portal\plugins\com.teamcenter.rac.common_8000.1.0.jar
	Total time: 0 ms
	Jad reported messages/errors:
Couldn't resolve all exception handlers in method run
	Exit status: 0
	Caught exceptions:
*/